package cn.myzf.fort.access.accesscommon.core.impl;

import cn.myzf.fort.access.accesscommon.autoconfigure.JschProperties;
import cn.myzf.fort.access.accesscommon.core.ChannelProperties;

import cn.myzf.fort.access.accesscommon.dto.HostInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;


@Component
public class YmlProperties implements ChannelProperties {

    @Autowired
    private JschProperties jschProperties;

    public YmlProperties() {

    }


    @Override
    public List<HostInfo> list() {
        if (jschProperties.getHostInfo()!=null && jschProperties.getHostInfo().size()>0)
        return jschProperties.getHostInfo();
        return null;
    }
}
